package ysc.cqnu.operdb.serviceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ysc.cqnu.operdb.entity.Engrave;
import ysc.cqnu.operdb.entity.ResultData;
import ysc.cqnu.operdb.mapper.DiaoKeMapper;
import ysc.cqnu.operdb.service.EnterDiaoKeInfoViewDetailsService;

@Service
public class EnterDiaoKeInfoViewDetailsServiceImpl implements EnterDiaoKeInfoViewDetailsService {
    @Autowired
    private ResultData resultData;
    @Autowired
    private Engrave engrave;
    @Autowired
    private DiaoKeMapper diaoKeMapper;
    @Override
    public ResultData enterDiaoKeInfoViewDetailsService(String id) {
        try {
            engrave = diaoKeMapper.diaokedetails(id);
            resultData.flag="enterDiaokeInfoViewDetailsSuccess";
            resultData.data=engrave;
            return resultData;
        }
        catch (Exception e){
            resultData.flag="enterDiaokeInfoViewDetailsFail";
            resultData.data=null;
            return resultData;
        }
    }
}
